package alvarodelrosal.chat.server.modelo;

public class ChatUser {

    private int userId;
    private String username;
    private String password;
    private String name;
    private String mail;
    private boolean isAdmin;

    public ChatUser(int userId, String username, String password, String name, String mail, boolean isAdmin) {
        this.userId = userId;
        this.username = username;
        this.password = password;
        this.name = name;
        this.mail = mail;
        this.isAdmin = isAdmin;
    }

    public boolean isAdmin() {
        return isAdmin;
    }

    public String getMail() {
        return mail;
    }

    public String getName() {
        return name;
    }

    public String getPassword() {
        return password;
    }

    public int getUserId() {
        return userId;
    }

    public String getUsername() {
        return username;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final ChatUser other = (ChatUser) obj;
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 61 * hash + this.userId;
        hash = 61 * hash + (this.username != null ? this.username.hashCode() : 0);
        hash = 61 * hash + (this.password != null ? this.password.hashCode() : 0);
        hash = 61 * hash + (this.name != null ? this.name.hashCode() : 0);
        hash = 61 * hash + (this.mail != null ? this.mail.hashCode() : 0);
        hash = 61 * hash + (this.isAdmin ? 1 : 0);
        return hash;
    }

    
    
}
